﻿using System;

namespace FlowersStore
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack && Request.UrlReferrer!=null)
                ViewState["backWay"] = Request.UrlReferrer.ToString();
        }

        protected void Login5_LoggedIn(object sender, EventArgs e)
        {
            Session.Add("Admin",true);
            Response.Redirect(ViewState["backWay"] != null ? ViewState["backWay"].ToString() : "AdminProducts.aspx");
        }

        protected void Login5_Authenticate(object sender, System.Web.UI.WebControls.AuthenticateEventArgs e)
        {
            
        }
    }
}